<template>
  <div class="start-view">
    <h1>Welcome to JPetStore 6</h1>
    <button @click="EnterStore">Enter the store</button>
    <p>Copyright Central South University.</p>
  </div>
</template>

<script lang="ts">
import { useRouter } from 'vue-router'

export default{
  name: 'StartView',
  setup() {
    const router = useRouter()
    const EnterStore = () => {
      router.push('/home')  // 跳转到 home 路由
    };

    return {
      EnterStore
    };
  }
  
};
</script>

<style scoped>
.start-view h1{
  margin-top: -40px;

}
.start-view  p{
  position: fixed;
  bottom: 20px;
  left: 20px;
  margin: 0;
}
.start-view button{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 30px;
  font-size: 40px;
  cursor: pointer;
  border: none;
  background-color: rgb(255, 255, 255);
  color: #344ed3
}

.start-view button::after{
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  left: 0;
  top: 0;
  border-radius: 5px;
  transform: scale(0);
  transition: transform 0.2s;
}
</style>